package vue;

import bdd.DAOOptions;
import java.awt.Rectangle;
import java.sql.SQLException;
import javax.swing.JFrame;
import modele.Jeu1;

/**
 *
 * @author flo
 */
public class Fenetre extends JFrame {

    private VueJeu1 v;
    private Jeu1 j1;


    public Fenetre() throws SQLException {
        int duree=new DAOOptions().getTemps();
        j1 = new Jeu1(duree);
        v = new VueJeu1();
        j1.setVue(v);
        
        this.setContentPane(v);
        this.setTitle("ENGLISH NOT NULL EXCEPTION");
        this.setSize(600, 300);
        this.setResizable(false);
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
        j1.run();
        
        
    }
    
    public Fenetre(Rectangle r) throws SQLException{
        int duree=new DAOOptions().getTemps();
        j1 = new Jeu1(duree);
        v = new VueJeu1();
        j1.setVue(v);

        this.setContentPane(v);
        this.setTitle("ENGLISH NOT NULL EXCEPTION");
        this.setSize(600, 200);
        this.setResizable(false);
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setBounds(r);
        this.setVisible(true);
        j1.run();
        
    }

    public VueJeu1 getVue() {
        return v;
    }
    
    

}
